// 客服美洽
function initServer(mqkey) {
    //配置初始化美洽需要的appkey
    var param = {
        appkey: mqkey
    };
    //初始化美洽
    mq.initMeiQia(param, function(ret, err) {
        if (ret) {
            //alert("初始化成功：\n\n" + JSON.stringify(ret) + "\n\n点击按钮继续");
            // show();
        } else {
            alert("初始化失败：\n\n" + JSON.stringify(err));
        }
    });
};

function tapService(userid) {

    //设置用户信息
    var infoParam = {
        email: "dev@meiqia.com",
        comment: "这是备注",
        avatar: "https://app.meiqia.com/images/logo.png",
        tags: ["手机APP", "北京"],
        "服务器": "电信一区"
    };
    mq.setClientInfo(infoParam);
    //设置自定义用户Id
    var customizedIdParam = {
        id: userid
    };
    mq.setLoginCustomizedId(customizedIdParam);

    //设置标题栏背景颜色
    var titleBarColor = {
        color: "#f12a59"
    };
    mq.setTitleBarColor(titleBarColor);
    //设置title以及按钮颜色
    var titleColor = {
        color: "#ffffff"
    };
    mq.setTitleColor(titleColor);
    //打开美洽客服界面
    mq.show();
};
